List provinsi
List Provinsi
Service ini digunakan untuk melihat list kode id dari provinsi
Service Info
HTTP Method | GET |
---|---|
Service Code | 30 |
Http Method | GET |
Path | .../v1.0/list/provinsi |
Authentication | OAuth 2.0 |
Header
Header Name | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
Content-Type | String | Y | application/json |
X-PARTNER-ID | String | Y | Client’s client_id (diberikan pada saat onboarding ) |
- CURL
- PHP
- NODE JS
- GO
curl --location --request GET 'https://devel.speedcash.co.id/qris-mpm/v1.0/list/provinsi' \
--header 'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc' \
--header 'Authorization: Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://devel.speedcash.co.id/qris-mpm/v1.0/list/provinsi',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'Authorization: Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'GET',
'url': '../v1.0/list/provinsi',
'headers': {
'x-partner-id': '6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'Authorization': 'Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "../v1.0/list/provinsi"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-partner-id", "6c57db4e-9e11-4951-9bcf-d6f177dafbcc")
req.Header.Add("Authorization", "Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
Parameter | Tipe Data | Deskripsi |
---|---|---|
responseCode | String | Kode response |
responseMessage | String | Pesan response |
additionalInfo | Array Of Object | Informasi tambahan. |
id_provinsi | Integer | id provinsi |
nama_provinsi | String | nama provinsi |
{
"responseCode": "2003000",
"responseMessage": "Successful",
"additionalInfo": [
{
"id_provinsi": 1,
"nama_provinsi": "Nanggroe Aceh Darussalam"
},
{
"id_provinsi": 12,
"nama_provinsi": "Bali"
},
{
"id_provinsi": 10,
"nama_provinsi": "Banten"
},
{
"id_provinsi": 21,
"nama_provinsi": "Bengkulu"
},
{
"id_provinsi": 27,
"nama_provinsi": "D I Yogyakarta"
},
{
"id_provinsi": 24,
"nama_provinsi": "DKI Jakarta"
},
{
"id_provinsi": 18,
"nama_provinsi": "Gorontalo"
},
]
}
List Response Code
Response Code | Response Message | Description |
---|---|---|
2003000 | Success | |
4003001 | Invalid field format { field name } | |
4013000 | Unauthorized. Invalid Signature | X-Signature salah |
4093000 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID sudah pernah digunakan di hari yang sama |
4043001 | Bad Request | Request header ada yang salah / kurang |
4043000 | Unauthorized. Client Forbidden Access API | Partner tidak dapat mengakses api terkait |
5003001 | General Error | Terjadi kesalahan |